package exception;

import utils.ResponseCode;

public class ActiveUserException extends Exception{
    //    为异常对象增加一个属性，这个属性是异常消息（代码和信息）
    private ResponseCode responseCode;
    //设计一个异常消息获取方法
    public ResponseCode getResponseCode() {
        return responseCode;
    }

    public ActiveUserException() {
        super();
    }

    public ActiveUserException(String message, Throwable cause) {
        super(message, cause);
    }
    //增加一个构造方法，来生成一个异常对象，参数就是异常消息
    public ActiveUserException(ResponseCode responseCode) {
        super(responseCode.getDesc());
        this.responseCode=responseCode;
    }

    public ActiveUserException(Throwable cause) {
        super(cause);
    }
}
